import axios from '../axios'

/* 
 * 任务管理
 */

// 实时启动
export const runTask = (data) => {
    return axios({
        url: '/kysj/spiderManager/runTask',
        method: 'post',
        data
    })
}

// 关闭任务
export const shutdownTask = (data) => {
    return axios({
        url: '/kysj/spiderManager/shutdownTask',
        method: 'post',
        data
    })
}

// 任务展示列表 
export const taskList = (page, size) => {
    return axios({
        url: '/kysj/spiderManager/findSpiderLogByPage?page='+page+'&size='+size,
        method: 'get',
    })
}

// 任务选择列表 
export const spiderManagerList = (page, size) => {
    return axios({
        url: '/kysj/spiderManager/spiderManagerLimitQuery?page='+page+'&size='+size,
        method: 'get',
    })
}

// 查询/搜索
export const spiderLogFindByKey = (keyWord,page, size) => {
    return axios({
        url: '/kysj/spiderManager/spiderLogFindByKey?keyWord='+keyWord+'&page='+page+'&size='+size,
        method: 'get',
    })
}

// 新增任务》搜索 
export const spiderFindByKey = (keyWord,page, size) => {
    return axios({
        url: '/kysj/spiderManager/spiderFindByKey?keyWord='+keyWord+'&page='+page+'&size='+size,
        method: 'get',
    })
}
